Chris Pollett >Old Classes >
CS157b

( Print View )

Advertisement:
  [
CS185C PDA Course]

Student Corner:
  [Grades Sec2]
  [Grades Sec3]

  [Submit Sec2]
  [Submit Sec3]

  [Lecture Notes]

Course Info:
  [Texts & Links]
  [Topics]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                           












CS157b Fall 2003Practice Final

The practice final will appear a week before the actual test. To study for the final I would suggest you: (1) Know how to do (by heart) all the practice problems. (2) Go over your notes three times. Second and third time try to see how huch you can remember from the first time. (3) Go over the homework problems. (4) Try to create your own problems similar to the ones I have given and solve them. (5) Skim the relevant sections from the book. (6) If you want to study in groups, at this point you are ready to quiz each other. The practice final is below. Here are some facts about the actual final: (a) The final will be in class Dec 15 12:15pm-2:30pm (Sec 2) and Dec 15 5:15pm-7:30pm (Sec 3).. (b) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (c) You should bring photo ID. (d) There will be more than one version of the test. Each version will be of comparable difficulty. (e) If your cell-phone or beeper goes off you will be excused from the test at that point and graded on what you have done till your excusal. (f) One problem (less typos) on the actual test will be from the practice test.

[Student created solutions.]

1. Define the terms recoverable schedule and strict schedule then give an example of a recoverable schedule that is not strict.

2. Define the term view equivalent. Give an example schedule in which is view serializable but not conflict serializable.

3.Consider the following schedule: S=(R_1(A), R_2(A), W_2(A), W_1(A)). Explain step by step giving all intermediate time stamps how the time stamp ordering algorithm for concurrency control would work on this schedule.

4.Consider the schedule S=(W_1(A), W_2(B), W_1(B), W_3(A), W_2(A)). Assume 2PL is being used. Draw the waits-for graph for this schedule. Explain what would happen if a wait-die policy was being used for deadlock prevention.

5. Explain step by step what happen when a checkpoint is written.

6. Explain the term steal and force with regards to page writing dirty pages on transactions. What is a compensation log record?

7. Consider the following partial log file:

LSN        LOG
00, 05     begin_checkpoint, end_checkpoint
10         update: T1 writes P2.
20         update: T3 writes P4.
50         update: T2 writes P3.
55         T1 abort
60         CLR: undo T1 LSN 10.
65         T1 END
70         T2 commit
75         crash

Explain how Aries would be used to recover from the crash of the above log file.

8. In Database Tuning give an example: (a) where one might choose 3NF normal form over BCNF, (b) where one might horizontally partition a table. For (b), give a definition of horizontally partitioning a table as well.

9. Distinguish between discretionary and mandatory access privileges. Then give the SQL needed to revoke select privileges on table Sailors from user Bob.

10. Recall the certificate.dtd we created earlier in the semester. Give the SQL needed to create a TYPE (not an XMLType) that could hold the same kind of data.